package com.hollysys.hollimsa.biz.istio.virtualservice.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * @author wangyuxi
 */
@ApiModel(value = "创建虚拟服务必要的参数")
@Data
public class VirtualserviceAdditionalVO implements Serializable {

    private static final long serialVersionUID = 7452502646452909570L;
    @ApiModelProperty(value = "规则名称符合正则表达式 [a-z0-9]([-a-z0-9]*[a-z0-9])?", required = true )
    /**
     *  规则名称
     */
    @NotEmpty(message = "规则名称不能为空！")
    @Pattern(regexp = "[a-z0-9]([-a-z0-9]*[a-z0-9])?", message = "不符合 DNS1123_LABEL_REGEX")
    private String ruleName;

    @ApiModelProperty(value = "访问方式 (public公网， cluster集群 )", required = true)
    /** 访问方式 (public公网， cluster集群 )*/
    private String requestType = "cluster";


    @ApiModelProperty(value = "路由类型(content基于请求内容, trafficRatio 基于流量比例)", required = true)
    /** 路由类型(content基于请求内容, trafficRatio 基于流量比例) */
    private String routerType = "content";

}
